<seed-content>
  <seed-toolbar-header>
    <seed-toolbar-title>帖子详情</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <div class="article-template article-template-summary" *ngIf="feed">
    <header class="header seed-flexbox seed-flexbox-align-center">
      <div class="subscriptions-posters-icon article-template-icon {{feed.userId}}">
        <seed-avatar [userId]="feed.userId" [lazyLoadAvatar]="feed?.userIcon"></seed-avatar>
      </div>
      <div class="article-template-content seed-flexbox-item">
        <div class="poster-name">
          <span class="nick-name text-ellipsis">{{feed?.nickName}}</span>
          <span
            class="icon-type"
            *ngIf="feed?.appImgtxtUrl"
            [style.background-image]="'url('+ feed?.appImgtxtUrl +' )' | safeStyle"
          ></span>
        </div>
        <p class="circle-name text-ellipsis" *ngIf="feed.circleName" (click)="goToCircleDetail(feed?.circleId)">
          {{feed?.circleName}}</p>
      </div>
      <div class="button-subscription"
           *ngIf="feed?.userId!=params.userId"
           (click)="handleFollow()"
           [class.isFollow]="feed.isFollow === 1"
      >
      </div>
    </header>


    <article class="article">
      <div class="article-title">
        <h3>{{feed?.title}}</h3>
        <div class="source">
          <time class="date">{{feed?.createTm | amDateFormat:'MM-DD HH:mm':'MM-dd HH:mm'}}</time>
          <span class="separator" *ngIf="feed != '' "></span>
          <span *ngFor="let feed of feed?.labels" class="tags">{{feed.labelName}}</span>
        </div>
      </div>

      <div class="section" *ngFor="let feed of feed?.feedContents">
        <p *ngIf="feed.contentType == 1">{{feed.content}}</p>
        <seed-img [lazyLoadImg]="feed.content"
                  [defaultImg]="'long'"
                  *ngIf="feed.contentType == 2"
        ></seed-img>
        <seed-video *ngIf="feed.contentType == 3"
                    [src]="feed.content"
                    [poster]="feed.thumbnail"
        ></seed-video>
      </div>
    </article>

    <div class="thumb-up-box" text-center>
      <div class="thumb-icon" (click)=" handleDigg()" [class.thumb-uped]="feed?.isDigg"></div>
      <div #diggNumber class="quantity-number">{{feed?.diggCount<'9999'?feed?.diggCount:'10000+'}}人赞过</div>
      <div class="avatar-list">
        <seed-avatar *ngFor="let user of feed.diggUserList;let i =index;" [lazyLoadAvatar]="user.userImg"
        ></seed-avatar>
      </div>
    </div>
  </div>
  <div *ngIf="comments.length > 0">
    <div class="gap"></div>
    <seed-comments [comments]="comments" [hasMoreData]="hasMoreData"></seed-comments>
  </div>
  <div class="seed-view-more-btn" *ngIf="comments.length > 0" downloadApp><span>下载求苗APP，查看更多精彩评论</span></div>
</seed-content>

